package com.yuhs.zixing.study.design.pattern.dp002.structural.s001.adapter.a001;

/**
 * @description:
 * @author: yuhs
 * @date: 2022/5/1 5:39 PM
 */
public class Phone001 {


    /**
     * 手机充电
     *
     * @param voltage5V 参数
     */
    public void charging(Voltage5V001 voltage5V) {
        if (voltage5V.output5V() == 5) {
            System.out.println("输出5V电压可以充电");
        } else {
            System.out.println("电压不合法 不能充电");
        }

    }


}
